package com.liu.proxy_studey.dynamicProxy_jdk;

public class text {
    public static void main(String[] args) throws InstantiationException, IllegalAccessException {
        /**
         *测试
         */
        Landlord landlord = new Landlord("张方东");
        /**
         * 代理类
         */
        Intermediary intermediary = new Intermediary();

        intermediary.setLandord(landlord);

        Rent proxy = (Rent) intermediary.getProxy();//可以使用Proxy获得实例

        System.out.println(proxy.RentHouse());
    }
}
